<?php
/**
 * Zend Framework (http://framework.zend.com/)
 *
 * @link      http://github.com/zendframework/ZendSkeletonApplication for the canonical source repository
 * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd New BSD License
 */

return array(
    'controllers' => array(
    		'invokables' => array(
    				'Mark\Controller\Mark' => 'Mark\Controller\MarkController',
    				'Mark\Controller\Like' => 'Mark\Controller\LikeController',
    		),
    ),
    'router' => array(
        'routes' => array(            
              'mark' => array(
                   'type'    => 'segment',
                   'options' => array(
                       'route'    => '/mark[/][:action][/:id][/:offset][/:limit]',
                       'constraints' => array(
                           'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                           'id'     => '[0-9]+',
                           'offset'     => '[0-9]+',
                           'limit'     => '[0-9]+',
                       ),
                       'defaults' => array(
                           'controller' => 'Mark\Controller\Mark',
                           'action'     => 'index',
                           'id'     => '0',
                           'offset'     => '0',
                           'limit'     => '0',
                       ),
                   ),
              ),            
              'like' => array(
                   'type'    => 'segment',
                   'options' => array(
                       'route'    => '/like[/][:action][/:id][/:offset][/:limit]',
                       'constraints' => array(
                           'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                           'id'     => '[0-9]+',
                           'offset'     => '[0-9]+',
                           'limit'     => '[0-9]+',
                       ),
                       'defaults' => array(
                           'controller' => 'Mark\Controller\Like',
                           'action'     => 'index',
                           'id'     => '0',
                           'offset'     => '0',
                           'limit'     => '0',
                       ),
                   ),
              ),
        ),
    ),
    'service_manager' => array(
        'factories' => array(
            'translator' => 'Zend\I18n\Translator\TranslatorServiceFactory',
        ),
    ),
    'translator' => array(
        'locale' => 'en_US',
        'translation_file_patterns' => array(
            array(
                'type'     => 'gettext',
                'base_dir' => __DIR__ . '/../language',
                'pattern'  => '%s.mo',
            ),
        ),
    ),
    'view_manager' => array(
        'display_not_found_reason' => true,
        'display_exceptions'       => true,
        'doctype'                  => 'HTML5',
        'not_found_template'       => 'error/404',
        'exception_template'       => 'error/index',
        'template_map' => array(
        ),
        'template_path_stack' => array(
            __DIR__ . '/../view',
        ),
        'strategies' => array(
        		'ViewJsonStrategy', // register JSON renderer strategy
        ),
    ),
    'doctrine' => array(
    		'driver' => array(
    				'Application_driver' => array(
    						'class' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver',
    						'cache' => 'array',
    						'paths' => array(__DIR__ . '/../src/Mark/Entity')
    				),
    				'orm_default' => array(
    						'drivers' => array(
    								'Mark\Entity' =>'Application_driver'
    						)
    				),
    				'orm_social' => array(
    						'drivers' => array(
    								'Mark\Entity' => 'Application_driver'
    						)
    				)
    		),
    		/*'authentication' => array(
    				'orm_default' => array(
    						'object_manager' => 'Doctrine\ORM\EntityManager',
    						'identity_class' => 'Application\Entity\User',
    						'identity_property' => 'email',
    						'credential_property' => 'password',
    						'credential_callable' => function ($user, $password) {
    							return ($user->password === md5($password));
    						}
    				),
    				'orm_confirm' => array(
    						'object_manager' => 'Doctrine\ORM\EntityManager',
    						'identity_class' => 'Application\Entity\User',
    						'identity_property' => 'email',
    						'credential_property' => 'password',
        				    'credential_callable' => function ($user, $password) {
        				    	return ($user->password === $password);
        				    }
    				),
    		),*/
    ),
'module_config' => array(
        'upload_location' =>  __DIR__ . '/../../../data/uploads',
        'upload_folder' => 'uploads',
        'images_location' =>  __DIR__ . '/../../../public/images',
        'images_folder' => 'images',
    ),
);
